﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MessageMge.aspx.cs" Inherits="Admin_MessageMge" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../CssFile/adminStyle.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="mgebox">
        <div class="mgenav"><a href="MessageMge.aspx?status=0">未回复</a>&nbsp;|&nbsp;<a href="MessageMge.aspx?status=1">已回复</a>&nbsp;|&nbsp;<a href="MessageMge.aspx">全部</a></div>
        <div class="listbox">
            <asp:Repeater ID="rptMessage" runat="server" 
                onitemcommand="rptMessage_ItemCommand">
                <HeaderTemplate>
                    <ul class="listheader">
                        <li style="width:100px;">昵称</li>
                        <li style="width:100px;">电话</li>
                        <li style="width:100px;">邮箱</li>
                        <li style="width:220px;">留言</li>
                        <li style="width:60px;">状态</li>
                        <li style="width:120px;">咨询时间</li>
                        <li style="width:120px;">回复时间</li>
                        <li style="width:100px;">操作</li>
                    </ul>
                </HeaderTemplate>
                <ItemTemplate>
                    <ul class="listcontent">
                        <li style="width:100px;"><%# Eval("UserName")%></li>
                        <li style="width:100px;"><%# Eval("Phone")%></li>
                        <li style="width:100px;"><%# Eval("Email")%></li>
                        <li style="width:220px;"><%# ApplicationHelper.GetOmittedString(Eval("MessageContent").ToString(), 30)%></li>
                        <li style="width:60px;"><%# Convert.ToInt32(Eval("Status")) == 1 ? "已回复" : "未回复"%></li>
                        <li style="width:120px;"><%# Eval("SubmitDate")%></li>
                        <li style="width:120px;"><%# Eval("ReplyDate")%></li>
                        <li style="width:100px;"><a href='MessageDetail.aspx?id=<%# Eval("MessageId") %>'>查看</a> 
                        <%--<asp:LinkButton id="lbtnHide" runat="server" Text='<%# Convert.ToInt32(Eval("Status")) == 1 ? "冻结" : "解冻" %>' CommandName="hide" CommandArgument='<%# Eval("MessageId") %>' OnClientClick="return confirm('确定冻结该留言吗？');"></asp:LinkButton> --%>
                        <asp:LinkButton id="lbtnDelete" runat="server" Text="删除" CommandName="delete" CommandArgument='<%# Eval("MessageId") %>' OnClientClick="return confirm('确认要删除该项吗？');"></asp:LinkButton></li>
                    </ul>
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <ul class="listcontent odd">
                        <li style="width:100px;"><%# Eval("UserName")%></li>
                        <li style="width:100px;"><%# Eval("Phone")%></li>
                        <li style="width:100px;"><%# Eval("Email")%></li>
                        <li style="width:220px;"><%# ApplicationHelper.GetOmittedString(Eval("MessageContent").ToString(), 30)%></li>
                        <li style="width:60px;"><%# Convert.ToInt32(Eval("Status")) == 1 ? "已回复" : "未回复"%></li>
                        <li style="width:120px;"><%# Eval("SubmitDate")%></li>
                        <li style="width:120px;"><%# Eval("ReplyDate")%></li>
                        <li style="width:100px;"><a href='MessageDetail.aspx?id=<%# Eval("MessageId") %>'>查看</a> 
                        <%--<asp:LinkButton id="lbtnHide" runat="server" Text='<%# Convert.ToInt32(Eval("Status")) == 1 ? "冻结" : "解冻" %>' CommandName="hide" CommandArgument='<%# Eval("MessageId") %>' OnClientClick="return confirm('确定冻结该留言吗？');"></asp:LinkButton> --%>
                        <asp:LinkButton id="lbtnDelete" runat="server" Text="删除" CommandName="delete" CommandArgument='<%# Eval("MessageId") %>' OnClientClick="return confirm('确认要删除该项吗？');"></asp:LinkButton></li>
                    </ul>
                </AlternatingItemTemplate>
            </asp:Repeater>
            <webdiyer:AspNetPager ID="anpList" runat="server" ShowPageIndexBox="always" FirstPageText="首页" LastPageText="尾页"
                            NextPageText="下一页" PrevPageText="上一页" ShowPageIndex="False" ShowInputBox="Always"
                            TextAfterInputBox="页" TextBeforeInputBox="转到" SubmitButtonText="Go"
                    onpagechanged="anpList_PageChanged"></webdiyer:AspNetPager>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
